/*  OK, we need three ranges of SMART_NPCs,
(1) NPC_BAS, 
	0-5M,  menpai skill only, Can have defense-parry, 
(2) NPC_MID, 
	5-10M  + all free-master skills and couple skill. 
	random_allowed in (5-15M);
(3) NPC_ADV, 
	10-15M + advanced basic, + haste/double, + adv-perk. 
*/

inherit SKILL;

string weapon_unarmed(string weapon_i,string unarmed_i);
int check_health(object target, int percent);
int accompany(object me);
int is_he_pet(object target);
int enemy_type(object enemy);
object *resort_enemy(string flag);
object *resort(object *group);

mapping *npctype = ({
	([      
		"group":		"fighter_w",
		"npc":                	"model",
                "name":			"蝶舞",
                "class":	      	"legend",
                "gender":		"女性",
                "skill_type_w":	      	"spear/yue-spear",
                "skill_type_u":		"qidaoforce",
                "u_adjust":		20,
                "skill_type_d":		"fall-steps",
                "d_adjust":		50,
                "unarmed":		"qidaoforce",
                "force":		"manjianghong",
                "parry":		"yue-spear",
                "spear":		"yue-spear",
                "dodge":		"fall-steps",
                "iron-cloth":		"xisui",
		"others1":		"meihua-shou",
		"others2":		"six-sense",
		"others3":		"luoriquan",
		"perform_weapon_attack":"official/spear/yue-spear/zonghengtianxia",
		"perform_busy_d":       "legend/dodge/fall-steps/luoyeqiufeng",
		"perform_busy_u":	"legend/unarmed/meihua-shou/meihai",
		"perform_unarmed_attack":"bat/unarmed/luoriquan/luori",
		
        ]), 	
//	随机的小喽罗。打法ok但并非优化。	
// This will generate a random skill NPC. Do not specify his weapon since he uses varies skills.
// He has some dodge/unarmed busy and a weapon attaack, difficulty moderate I would say.
// You can use it as 小喽罗.
	([      
		"group":		"fighter_w",
		"npc":                	"smallguy",
                "name":			"小喽罗",
                "class":	      	"wolfmount",
                "gender":		"男性",
                "force":		"manjianghong",
		"others1":		"bloodystrike",
		"others2":		"strategy",
		"others3":		"leadership",
		"perform_weapon_attack": "random",
		"perform_unarmed_attack":"random",
		"perform_busy_d":	 "random",
		"perform_busy_u":	 "random",
        ]),	
// baiyun
        ([      
		"group":		"fighter_w",
		"npc":                	"musician",
                "name":			"琵琶公主",
                "class":	      	"baiyun",
                "gender":		"女性",
                "force":		"chessism",
		"unarmed":		"calligraphy",
                "sword":		"feixian-sword",
                "parry":		"feixian-sword",
                "dodge":		"feixian-steps",
		"magic":		"music",
		"perform_weapon_attack":"baiyun/sword/feixian-sword/tianwaifeixian",
		"perform_unarmed_attack": "baiyun/unarmed/calligraphy/sangluan",
        ]),	
//Officer	: 
	([      
		"group":		"fighter_w",
		"npc":                	"yue-spear1",
                "name":			"无聊",
                "class":	      	"official",
                "gender":		"女性",
                "skill_type_w":	      	"spear/yue-spear",
                "skill_type_u":		"changquan",
                "u_adjust":		20,
                "skill_type_d":		"fall-steps",
                "d_adjust":		50,
		"unarmed":		"changquan",
                "spear":		"yue-spear",
                "force":		"manjianghong",
                "parry":		"yue-spear",
                "dodge":		"fall-steps",
		"others1":		"bloodystrike",
		"others2":		"strategy",
		"others3":		"leadership",
		"perform_weapon_attack":"official/spear/yue-spear/zonghengtianxia",
		"perform_unarmed_attack": "random",
		"perform_unarmed_attack2":"official/unarmed/changquan/yuhuan",
		"perform_busy_d":	"random",
		"perform_busy_u":	"random",
	]),
	([      
		"group":		"fighter_w",
		"npc":                	"yue-spear1a",
                "name":			"无聊",
                "class":	      	"official",
                "gender":		"女性",
                "skill_type_w":	      	"spear/yue-spear",
                "skill_type_u":		"changquan",
                "u_adjust":		20,
                "skill_type_d":		"fall-steps",
                "d_adjust":		50,
		"unarmed":		"changquan",
                "spear":		"yue-spear",
                "force":		"manjianghong",
                "parry":		"yue-spear",
                "dodge":		"fall-steps",
		"others1":		"bloodystrike",
		"others2":		"strategy",
		"others3":		"leadership",
		"perform_weapon_attack":"official/spear/yue-spear/zonghengtianxia",
		"perform_unarmed_attack": "random",
		"perform_unarmed_attack2":"official/unarmed/changquan/yuhuan",
		"perform_busy_d":       "legend/dodge/fall-steps/luoyeqiufeng",
		"perform_busy_u":	"lama/unarmed/bloodystrike/fofawubian",
        ]),
	([      
		"group":		"fighter_w",
		"npc":                	"yue-spear2",
                "name":			"土土",
                "class":	      	"official",
                "gender":		"女性",
                "skill_type_w":	      	"spear/yue-spear",
                "skill_type_u":		"changquan",
                "u_adjust":		20,
                "skill_type_d":		"puti-steps",
                "d_adjust":		50,
                "unarmed":		"changquan",
                "spear":		"yue-spear",
                "force":		"manjianghong",
                "parry":		"yue-spear",
                "dodge":		"puti-steps",
		"others1":		"bloodystrike",
		"others2":		"strategy",
		"others3":		"leadership",
		"perform_weapon_attack":"official/spear/yue-spear/zonghengtianxia",
		"perform_unarmed_attack":"official/unarmed/changquan/yuhuan",
		"perform_busy_d":       "legend/dodge/fall-steps/luoyeqiufeng",
		"perform_busy_u":	"random",
		"set_master":		"master yue",
        ]),   
        	([      
		"group":		"fighter_w",
		"npc":                	"yue-spear2a",
                "name":			"土土",
                "class":	      	"official",
                "gender":		"女性",
                "skill_type_w":	      	"spear/yue-spear",
                "skill_type_u":		"changquan",
                "u_adjust":		20,
                "skill_type_d":		"puti-steps",
                "d_adjust":		50,
                "unarmed":		"changquan",
                "spear":		"yue-spear",
                "force":		"manjianghong",
                "parry":		"yue-spear",
                "dodge":		"puti-steps",
		"others1":		"bloodystrike",
		"others2":		"strategy",
		"others3":		"leadership",
		"perform_weapon_attack":"official/spear/yue-spear/zonghengtianxia",
		"perform_unarmed_attack":"random",
		"perform_busy_d":       "random",
		"perform_busy_u":	"random",
		"set_master":		"master yue",
        ]),   
//Legend male/female
	([      
		"group":		"fighter_w",
		"npc":                	"diesword",
                "name":			"蝶舞",
                "class":	      	"legend",
                "gender":		"女性",
                "skill_type_w":	      	"sword/diesword",
                "skill_type_u":		"qidaoforce",
                "u_adjust":		20,
                "skill_type_d":		"fall-steps",
                "d_adjust":		50,
                "unarmed":		"qidaoforce",
                "sword":		"diesword",
                "force":		"qidaoforce",
                "parry":		"diesword",
                "blade":		"shortsong-blade",
                "dodge":		"fall-steps",
                "iron-cloth":		"xisui",
		"others1":		"meihua-shou",
		"others2":		"six-sense",
		"perform_weapon_attack":"legend/sword/diesword/caidiekuangwu",
		"perform_busy_d":       "legend/dodge/fall-steps/luoyeqiufeng",
		"perform_busy_u":	"legend/unarmed/meihua-shou/meihai",
		"set_temp1":		"pfm/qidaoforce_juqi",
		"set_temp2":		"pfm/qidaoforce_diemeng", 
		"set_master":		"master xuerui",          
        ]),  
        ([      
		"group":		"fighter_w",
		"npc":                	"shortsong-blade",
                "name":			"阿谈",
                "class":	      	"legend",
                "gender":		"男性",
                "skill_type_w":	      	"blade/shortsong-blade",
                "skill_type_u":		"qidaoforce",
                "skill_type_d":		"fall-steps",
                "d_adjust":		50,
                "u_adjust":		20,
                "unarmed":		"qidaoforce",
                "blade":		"shortsong-blade",
                "force":		"qidaoforce",
                "parry":		"shortsong-blade",
                "dodge":		"fall-steps",
                "others1":		"meihua-shou",
		"perform_weapon_attack":"legend/blade/shortsong-blade/duangechangmeng",
		"perform_busy_d":       "legend/dodge/fall-steps/luoyeqiufeng",
		"perform_busy_u":	"legend/unarmed/meihua-shou/meihai",
		"set_temp1":		"pfm/qidaoforce_juqi",           
        ]),  
//Baiyun - feixian
        ([      
		"group":		"fighter_w",
		"npc":                	"feixian-sword",
                "name":			"飞仙",
                "class":	      	"baiyun",
                "gender":		"男性",
                "skill_type_w":	      	"sword/feixian-sword",
                "skill_type_u":		"calligraphy",
                "skill_type_d":		"feixian-steps",
                "unarmed":		"calligraphy",
                "sword":		"feixian-sword",
                "force":		"painting",
                "parry":		"feixian-sword",
                "dodge":		"feixian-steps",
		"others1":		"chessism",
		"others2":		"dabei-strike",
		"others3":		"music",
		"perform_weapon_attack":"baiyun/sword/feixian-sword/tianwaifeixian",
		"perform_busy_u":	"shaolin/unarmed/dabei-strike/qianshouqianbian",
        ]),  
//Shenji-blade && bat-blade
        ([      
		"group":		"fighter_w",
		"npc":                	"shenji-blade",
                "name":			"谢老掌柜",
                "class":	      	"bat",
                "gender":		"男性",
                "skill_type_w":	      	"blade/shenji-blade",
                "skill_type_u":		"luoriquan",
                "skill_type_d":		"shenji-steps",
                "u_adjust":		20,
                "unarmed":		"luoriquan",
                "blade":		"shenji-blade",
                "parry":		"shenji-blade",
                "dodge":		"shenji-steps",
		"others1":		"enmeiryu",
		"others2":		"wind-blade",
		"perform_weapon_attack":"npc/blade/shenji-blade/jichulianhuan",
		"perform_weapon_attack2":"npc/blade/wind-blade/leitingpili",
		"perform_weapon_attack3":"ninja/blade/ittouryu/hyakki",
		"perform_unarmed_attack":"bat/unarmed/luoriquan/luori",
		"perform_unarmed_attack2":"ninja/unarmed/enmeiryu/mukuha",
		"perform_unarmed_attack3":"ninja/unarmed/enmeiryu/shimon",
		"perform_busy_d":       "npc/dodge/shenji-steps/shenjimiaosuan",
        ]), 
        ([      
		"group":		"fighter_w",
		"npc":                	"bat-blade",
                "name":			"袁青谷",
                "class":	      	"bat",
                "gender":		"男性",
                "skill_type_w":	      	"blade/bat-blade",
                "skill_type_u":		"luoriquan",
                "skill_type_d":		"meng-steps",
                "u_adjust":		20,
                "unarmed":		"luoriquan",
                "blade":		"bat-blade",
                "parry":		"bat-blade",
                "dodge":		"meng-steps",
                "others1":		"enmeiryu",
                "others2":		"wind-blade",
		"perform_weapon_attack":"bat/blade/bat-blade/shiwanshenmo",
		"perform_weapon_attack2":"npc/blade/wind-blade/leitingpili",
		"perform_weapon_attack3":"ninja/blade/ittouryu/hyakki",
		"perform_unarmed_attack":"bat/unarmed/luoriquan/luori",
		"perform_unarmed_attack2":"ninja/unarmed/enmeiryu/mukuha",
		"perform_unarmed_attack3":"ninja/unarmed/enmeiryu/shimon",
		"perform_busy_d":       "bat/dodge/meng-steps/huanyinqianchong",
        ]), 
// Assassin 
        ([    
        	"group":		"fighter_w",
		"npc":                	"longfenghuan",
                "name":			"云",
                "class":	      	"assassin",
                "gender":		"男性",
                "skill_type_w":	      	"hammer/longfenghuan",
                "skill_type_u":		"flame-strike",
                "skill_type_d":		"jinhong-steps",
                "d_adjust":		50,
                "unarmed":		"flame-strike",
                "hammer":		"longfenghuan",
                "force":		"jingxing",
                "parry":		"longfenghuan",
                "dodge":		"jinhong-steps",
                "sword":		"sharen-sword",
                "others1":		"bloodystrike",
                "iron-cloth":		"xisui",
                "perform_weapon_attack":"assassin/hammer/longfenghuan/longfengshuangfei",
		"perform_weapon_attack2":"assassin/sword/sharen-sword/sharenruma",
		"perform_busy_d":	"assassin/dodge/jinhong-steps/canglongzhaxian",
		"perform_busy_u":	"lama/unarmed/bloodystrike/fofawubian",
        ]),  
        ([    
        	"group":		"fighter_w",
		"npc":                	"longfenghuan1a",
                "name":			"云",
                "class":	      	"assassin",
                "gender":		"男性",
                "skill_type_w":	      	"hammer/longfenghuan",
                "skill_type_u":		"flame-strike",
                "skill_type_d":		"jinhong-steps",
                "d_adjust":		50,
                "unarmed":		"flame-strike",
                "hammer":		"longfenghuan",
                "force":		"jingxing",
                "parry":		"longfenghuan",
                "dodge":		"jinhong-steps",
                "sword":		"sharen-sword",
                "others1":		"bloodystrike",
                "iron-cloth":		"xisui",
                "perform_weapon_attack":"assassin/hammer/longfenghuan/longfengshuangfei",
		"perform_weapon_attack2":"assassin/sword/sharen-sword/sharenruma",
		"perform_busy_d":	"random",
		"perform_busy_u":	"lama/unarmed/bloodystrike/fofawubian",
        ]),  
        ([    
        	"group":		"fighter_w",
		"npc":                	"sharen-sword",
                "name":			"小飞",
                "class":	      	"assassin",
                "gender":		"男性",
                "skill_type_w":	      	"sword/sharen-sword",
                "skill_type_u":		"flame-strike",
                "skill_type_d":		"jinhong-steps",
                "d_adjust":		50,
                "w_adjust":		20,
                "unarmed":		"flame-strike",
                "sword":		"sharen-sword",
                "force":		"jingxing",
                "parry":		"lefthand-sword",
                "dodge":		"jinhong-steps",
                "iron-cloth":		"xisui",
                "others1":		"lefthand-sword",
		"perform_weapon_attack":"assassin/sword/sharen-sword/sharenruma",
		"perform_busy_d":	"assassin/dodge/jinhong-steps/canglongzhaxian",
        ]),  
	([      
		"group":		"fighter_w",
		"npc":                	"longfenghuan2",
                "name":			"痒痒绕",
                "class":	      	"assassin",
                "gender":		"女性",
                "skill_type_w":	      	"hammer/longfenghuan",
                "skill_type_u":		"flame-strike",
                "d_adjust":		50,
                "skill_type_d":		"cloud-dance",
                "unarmed":		"flame-strike",
                "hammer":		"longfenghuan",
                "force":		"jingxing",
                "parry":		"longfenghuan",
                "dodge":		"cloud-dance",
                "iron-cloth":		"xisui",
		"others1":		"meihua-shou",
		"perform_weapon_attack":"assassin/hammer/longfenghuan/longfengshuangfei",
		"perform_busy_d":	"assassin/dodge/cloud-dance/yexuechuji",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"dagou-stick",
                "name":			"上官十",
                "class":	      	"beggar",
                "gender":		"男性",
                "skill_type_w":	      	"staff/dagou-stick",
                "skill_type_u":		"dragonstrike",
                "u_adjust":		20,
                "skill_type_d":		"doggiesteps",
                "d_adjust":		100,
                "unarmed":		"dragonstrike",
                "staff":		"dagou-stick",
                "force":		"huntunforce",
                "parry":		"dagou-stick",
                "dodge":		"doggiesteps",
                "perform_weapon_attack":"beggar/staff/dagou-stick/tianxiawugou",
		"perform_weapon_attack2":"beggar/staff/dagou-stick/banzijue",
		"perform_weapon_attack3":"beggar/dodge/doggiesteps/goujitiaoqiang",	
		"perform_unarmed_attack":"beggar/unarmed/dragonstrike/xianglongwuhui",
		"perform_busy_w":	"beggar/staff/dagou-stick/banzijue", 
        ]),   
	([      
		"group":		"fighter_u",
		"npc":                	"dragonstrike",
                "name":			"上官十",
                "class":	      	"beggar",
                "gender":		"男性",
                "skill_type_u":		"dragonstrike",
                 "skill_type_d":	"doggiesteps",
                "d_adjust":		100,
                "unarmed":		"dragonstrike",
                "force":		"huntunforce",
                "dodge":		"doggiesteps",
                "perform_unarmed_attack":"beggar/unarmed/dragonstrike/xianglongwuhui",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"taiji-sword",
                "name":			"蝴蝶",
                "class":	      	"wudang",
                "gender":		"女性",
                "skill_type_w":	      	"sword/taiji-sword",
                "skill_type_u":		"taiji",
                "w_adjust":		10,
                "skill_type_d":		"five-steps",
                "unarmed":		"taiji",
                "sword":		"taiji-sword",
                "force":		"taijiforce",
                "parry":		"taiji-sword",
                "dodge":		"five-steps",
                "others1":		"enmeiryu",
                "iron-cloth":		"xisui",
		"perform_busy_w":"wudang/sword/taiji-sword/chanzijue",
		"perform_unarmed_attack":"ninja/unarmed/enmeiryu/mukuha",        
		"perform_unarmed_attack2":"ninja/unarmed/enmeiryu/shimon",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"taiji",
                "name":			"阿龙",
                "class":	      	"wudang",
                "gender":		"男性",
                "skill_type_w":	      	"sword/taiji-sword",
                "skill_type_u":		"taiji",
                "w_adjust":		10,
                "skill_type_d":		"five-steps",
                "unarmed":		"taiji",
                "force":		"taijiforce",
                "sword":		"taiji-sword",
                "parry":		"taiji-sword",
                "dodge":		"five-steps",
                "iron-cloth":		"xisui",
                "others1":		"enmeiryu",
		"perform_busy_u":"wudang/unarmed/taiji/nianzijue",
		"perform_unarmed_attack":"ninja/unarmed/enmeiryu/mukuha",        
		"perform_unarmed_attack2":"ninja/unarmed/enmeiryu/shimon",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"nine-moon-sword",
                "name":			"明月",
                "class":	      	"shenshui",
                "gender":		"女性",
                "skill_type_w":	      	"sword/nine-moon-sword",
                "skill_type_u":		"nine-moon-claw",
                "skill_type_d":		"nine-moon-steps",
                "d_adjust":		100,
                "w_adjust":		30,
                "u_adjust":		0,
                "unarmed":		"nine-moon-claw",
                "sword":		"nine-moon-sword",
                "force":		"nine-moon-force",
                "parry":		"qingpingsword",
                "dodge":		"nine-moon-steps",
		"others1":		"nine-moon-spirit",
		"others2":		"qingpingsword",
		"perform_weapon_attack":"shenshui/sword/nine-moon-sword/shuanglengcanxia",
		"perform_unarmed_attack":"shenshui/unarmed/nine-moon-claw/polu",
		"perform_busy_d":       "shenshui/dodge/nine-moon-steps/npc_lianhuanbu",
		"set_temp1":		"nine-moon-force_poison",           
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"nine-moon-sword2",
                "name":			"天正下着雨",
                "class":	      	"shenshui",
                "gender":		"女性",
                "skill_type_w":	      	"sword/nine-moon-sword",
                "skill_type_u":		"nine-moon-claw",
                "skill_type_d":		"nine-moon-steps",
                "d_adjust":		100,
                "w_adjust":		30,
                "u_adjust":		0,
                "unarmed":		"nine-moon-claw",
                "sword":		"nine-moon-sword",
                "force":		"nine-moon-force",
                "parry":		"qingpingsword",
                "dodge":		"nine-moon-steps",
		"others1":		"nine-moon-spirit",
		"others2":		"qingpingsword",
		"perform_weapon_attack":"shenshui/sword/nine-moon-sword/shuanglengcanxia",
		"perform_unarmed_attack":"shenshui/unarmed/nine-moon-claw/polu",
		"perform_busy_w":	"shenshui/sword/qingpingsword/fengzijue",
		"set_temp1":		"nine-moon-force_poison",           
        ]),         
	([      
		"group":		"fighter_w",
		"npc":                	"cloudstaff",
                "name":			"苦苦",
                "class":	      	"bonze",
                "gender":		"男性",
                "skill_type_w":	      	"staff/cloudstaff",
                "skill_type_u":		"dabei-strike",
                "skill_type_d":		"fengyu-piaoxiang",
                "d_adjust":		50,
                "unarmed":		"dabei-strike",
                "staff":		"cloudstaff",
                "force":		"lotusforce",
                "parry":		"cloudstaff",
                "dodge":		"fengyu-piaoxiang",
		"magic":		"essencemagic",
		"perform_weapon_attack":"bonze/staff/cloudstaff/longxianyuye",
		"perform_busy_d":	"bat/dodge/fengyu-piaoxiang/zonghengsihai",
		"perform_busy_u":	"bonze/unarmed/dabei-strike/qianshouqianbian",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"mind-sense",
                "name":			"笨笨",
                "class":	      	"bonze",
                "gender":		"男性",
                "skill_type_w":	      	"staff/cloudstaff",
                "skill_type_u":		"dabei-strike",
                "skill_type_d":		"fengyu-piaoxiang",
                "d_adjust":		50,
                "unarmed":		"dabei-strike",
                "staff":		"cloudstaff",
                "force":		"lotusforce",
                "parry":		"cloudstaff",
                "dodge":		"fengyu-piaoxiang",
		"magic":		"essencemagic",
		"perform_weapon_attack":"bonze/staff/cloudstaff/npc_mind_sense",
		"perform_unarmed_attack":"bonze/unarmed/dabei-strike/npc_mind_sense",
		"perform_busy_d":	"bat/dodge/fengyu-piaoxiang/zonghengsihai",
		"perform_busy_u":	"bonze/unarmed/dabei-strike/qianshouqianbian",
      ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"doomsword",
                "name":			"东门飞雪",
                "class":	      	"fighter",
                "gender":		"女性",
                "skill_type_w":	      	"sword/doomsword",
                "skill_type_u":		"doomstrike",
                "u_adjust":		0,
                "skill_type_d":		"doomsteps",
                "d_adjust":		30,
                "unarmed":		"doomstrike",
                "sword":		"doomsword",
                "force":		"doomforce",
                "parry":		"doomsword",
                "dodge":		"doomsteps",
		"others1":		"meihua-shou",
		"others2":		"dugu-sword",
		"perform_weapon_attack":"fighter/sword/doomsword/hunranyijian",
		"perform_weapon_attack2":"fighter/sword/dugu-sword/npc_sword_poqi",
		"perform_unarmed_attack":"fighter/unarmed/doomstrike/hantian",
		"perform_unarmed_attack2":"legend/unarmed/meihua-shou/meihai",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"softsword",
                "name":			"天意梦断",
                "class":	      	"swordsman",
                "gender":		"男性",
                "skill_type_w":	      	"sword/softsword",
                "skill_type_u":		"dabei-strike",
                "u_adjust":		20,
                "skill_type_d":		"shadowsteps",
                "d_adjust":		50,
                "unarmed":		"dabei-strike",
                "sword":		"softsword",
                "force":		"cloudforce",
                "iron-cloth":		"xisui",
                "parry":		"softsword",
                "dodge":		"shadowsteps",
		"others1":		"dugu-sword",
		"perform_weapon_attack":"swordsman/sword/softsword/npc_sword_muyu",
		"perform_weapon_attack2":"swordsman/sword/softsword/changtianluodian",
		"perform_weapon_attack3":"swordsman/dodge/shadowsteps/lianhuanjiao",
		"perform_busy_u":	"shaolin/unarmed/dabei-strike/qianshouqianbian",
        ]), 
 	([      
		"group":		"fighter_w",
		"npc":                	"xuezhan-spear",
                "name":			"阿铭",
                "class":	      	"fugui",
                "gender":		"男性",
                "skill_type_w":	      	"spear/xuezhan-spear",
                "skill_type_u":		"eagle-claw",
                "u_adjust":		 20,
                "skill_type_d":		"hawk-steps",
                "unarmed":		"eagle-claw",
                "spear":		"xuezhan-spear",
                "force":		"skyforce",
                "parry":		"xuezhan-spear",
                "dodge":		"hawk-steps",
		"iron-cloth":		"henglian",
		"others1":		"yue-spear",
		"others2":		"manjianghong",
		"perform_weapon_attack":"fugui/spear/xuezhan-spear/yutianbigao",
		"perform_weapon_attack2":"fugui/spear/xuezhan-spear/bafangfengyu",
		"perform_weapon_attack3":"official/spear/yue-spear/zonghengtianxia",
		"perform_busy_d":       "fugui/dodge/hawk-steps/yingjichangkong",
        ]),         
	([      
		"group":		"fighter_w",
		"npc":                	"liuquan-steps",
                "name":			"流泉",
                "class":	      	"huangshan",
                "gender":		"女性",
                "skill_type_w":	      	"sword/siqi-sword",
                "skill_type_u":		"yunwu-strike",
                "skill_type_d":		"liuquan-steps",
                "unarmed":		"yunwu-strike",
                "sword":		"siqi-sword",
                "force":		"xianjing",
                "parry":		"siqi-sword",
                "dodge":		"liuquan-steps",
		"perform_busy_d":       "huangshan/dodge/liuquan-steps/liushuichanchan",
		"perform_busy_u":	"huangshan/unarmed/yunwu-strike/miwu",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"siqi-sword",
                "name":			"四奇",
                "class":	      	"huangshan",
                "gender":		"女性",
                "skill_type_w":	      	"sword/siqi-sword",
                "skill_type_u":		"yunwu-strike",
                "skill_type_d":		"liuquan-steps",
                "unarmed":		"yunwu-strike",
                "sword":		"siqi-sword",
                "force":		"xianjing",
                "parry":		"siqi-sword",
                "dodge":		"liuquan-steps",
		"perform_weapon_attack":"huangshan/sword/siqi-sword/siqi",
		"perform_busy_u":	"huangshan/unarmed/yunwu-strike/miwu",     
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"qiusheng-blade",
                "name":			"秋声",
                "class":	      	"huangshan",
                "gender":		"男性",
                "skill_type_w":	      	"blade/qiusheng-blade",
                "skill_type_u":		"yunwu-strike",
                "skill_type_d":		"liuquan-steps",
                "unarmed":		"yunwu-strike",
                "blade":		"qiusheng-blade",
                "force":		"xianjing",
                "parry":		"qiusheng-blade",
                "dodge":		"liuquan-steps",
		"perform_weapon_attack":"huangshan/blade/qiusheng-blade/jingsheng",
		"perform_busy_u":	"huangshan/unarmed/yunwu-strike/miwu",     
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"qingfeng-sword",
                "name":			"蓝月光",
                "class":	      	"huashan",
                "gender":		"女性",
                "skill_type_w":	      	"sword/qingfeng-sword",
                "skill_type_u":		"zhaixin-claw",
                "skill_type_d":		"cloud-dance",
                "unarmed":		"zhaixin-claw",
                "sword":		"qingfeng-sword",
                "force":		"hanmei-force",
                "parry":		"qingfeng-sword",
                "dodge":		"cloud-dance",
		"iron-cloth":		"spring-water",
		"others1":		"dugu-sword",
		"perform_weapon_attack":"huashan/sword/dugu-sword/npc_sword_poqi",
		"perform_weapon_attack2":"huashan/sword/qingfeng-sword/npc_chill",
		"perform_busy_d":       "huashan/dodge/cloud-dance/yexuechuji",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"tanzhi-shentong",
                "name":			"红月光",
                "class":	      	"huashan",
                "gender":		"女性",
                "skill_type_w":	      	"throwing/tanzhi-shentong",
                "skill_type_u":		"zhaixin-claw",
                "skill_type_d":		"cloud-dance",
                "unarmed":		"zhaixin-claw",
                "sword":		"dugu-sword",
                "force":		"hanmei-force",
                "parry":		"qingfeng-sword",
                "dodge":		"cloud-dance",
                "throwing":		"tanzhi-shentong",
		"iron-cloth":		"spring-water",
		"others1":		"dugu-sword",
		"perform_weapon_attack":"huashan/throwing/tanzhi-shentong/mantianhuayu",
		"perform_weapon_attack2":"huashan/sword/dugu-sword/npc_sword_poqi",
		"perform_weapon_attack3":"huashan/sword/qingfeng-sword/npc_chill",
		"perform_busy_d":       "huashan/dodge/cloud-dance/yexuechuji",
        ]),         
	([      
		"group":		"fighter_w",
		"npc":                	"xuanyuan-axe",
                "name":			"大西瓜",
                "class":	      	"knight",
                "gender":		"男性",
                "skill_type_w":	      	"axe/xuanyuan-axe",
                "skill_type_u":		"hanshan-strike",
                "u_adjust":		10,
                "skill_type_d":		"windy-steps",
                "unarmed":		"hanshan-strike",
                "axe":			"xuanyuan-axe",
                "force":		"longlife-force",
                "parry":		"xuanyuan-axe",
                "dodge":		"windy-steps",
		"perform_weapon_attack":"knight/axe/xuanyuan-axe/guifushengong",
		"perform_weapon_attack2":"knight/axe/xuanyuan-axe/jiuqipoxiao",
		"perform_unarmed_attack":"knight/unarmed/hanshan-strike/zhangjian",
		"perform_busy_d":       "knight/dodge/windy-steps/fengliu",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"ittouryu",
                "name":			"恶鬼",
                "class":	      	"ninja",
                "gender":		"女性",
                "skill_type_w":	      	"blade/ittouryu",
                "skill_type_u":		"enmeiryu",
                "u_adjust":		30,
                "skill_type_d":		"ghosty-steps",
                "d_adjust":		50,
                "unarmed":		"enmeiryu",
                "blade":		"ittouryu",
                "force":		"ghosty-force",
                "parry":		"ittouryu",
                "dodge":		"ghosty-steps",
		"others1":		"bloodystrike",
		"others2":		"wind-blade",
		"others3":		"meng-steps",
		"perform_weapon_attack":"ninja/blade/ittouryu/gobankiri",
		"perform_weapon_attack2":"npc/blade/wind-blade/leitingpili",
		"perform_weapon_attack3":"ninja/blade/ittouryu/hyakki",
		"perform_unarmed_attack":"bat/dodge/meng-steps/huanyinqianchong",
		"perform_unarmed_attack2":"ninja/unarmed/enmeiryu/shimon",
		"perform_unarmed_attack3":"lama/unarmed/bloodystrike/fofawubian",
		"perform_unarmed_attack4":"ninja/unarmed/enmeiryu/mukuha",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"assassin-hammer",
                "name":			"搏浪",
                "class":	      	"wolfmount",
                "gender":		"男性",
                "skill_type_w":	      	"hammer/assassin-hammer",
                "skill_type_u":		"wolf-strike",
                "skill_type_d":		"xueyeqianzong",
                "u_adjust":		20,
                "unarmed":		"wolf-strike",
                "hammer":		"assassin-hammer",
                "force":		"wolf-force",
                "parry":		"assassin-hammer",
                "dodge":		"xueyeqianzong",
		"others1":		"summonwolf",
		"others2":		"animal-training",
		"others2":		"meihua-shou",
//		"perform_weapon_attack":"wolfmount/",
		"perform_unarmed_attack":"wolfmount/unarmed/wolf-strike/npc_xiao",
		"perform_unarmed_attack2":"wolfmount/unarmed/wolf-strike/duanhou",
		"perform_unarmed_attack3":"legend/unarmed/meihua-shou/meihai",
        ]), 
	([      
		"group":		"fighter_w",
		"npc":                	"xinyue-dagger",
                "name":			"朱云",
                "class":	      	"wolfmount",
                "gender":		"男性",
                "skill_type_w":	      	"dagger/xinyue-dagger",
                "skill_type_u":		"wolf-strike",
                "skill_type_d":		"xueyeqianzong",
                "u_adjust":		20,
                "w_adjust":		-30,
                "unarmed":		"wolf-strike",
                "dagger":		"xinyue-dagger",
                "force":		"wolf-force",
                "parry":		"xinyue-dagger",
                "dodge":		"xueyeqianzong",
		"others1":		"summonwolf",
		"others2":		"animal-training",
		"others2":		"meihua-shou",
		"perform_weapon_attack":"wolfmount/dagger/xinyue-dagger/douzhuanxingyi",
		"perform_unarmed_attack":"wolfmount/unarmed/wolf-strike/npc_xiao",
		"perform_unarmed_attack2":"wolfmount/unarmed/wolf-strike/duanhou",
		"perform_unarmed_attack3":"legend/unarmed/meihua-shou/meihai",
        ]), 
  	([      
		"group":		"fighter_w",
		"npc":                	"thunderwhip",
                "name":			"小狂刀",
                "class":	      	"yinshi",
                "gender":		"男性",
                "skill_type_w":	      	"whip/thunderwhip",
                "skill_type_u":		"pofeng-strike",
                "u_adjust":		30,
                "skill_type_d":		"zuixian-steps",
                "d_adjust":		20,
                "unarmed":		"pofeng-strike",
                "hammer":		"pangu-hammer",
                "force":		"iceheart",
                "parry":		"pangu-hammer",
                "dodge":		"zuixian-steps",
                "whip":			"thunderwhip",
		"cursism":		"celecurse",
		"others1":		"bloodystrike",
		"others2":		"liangyi-force",
		"perform_weapon_attack":"yinshi/whip/thunderwhip/tianleiyiji",
		"perform_weapon_attack2":"yinshi/whip/thunderwhip/yunlongjiuxian",
		"perform_weapon_attack3":"yinshi/hammer/pangu-hammer/kaitianpidi",
		"perform_unarmed_attack":"yinshi/unarmed/pofeng-strike/luanpofeng",
		"perform_unarmed_attack2":"yinshi/unarmed/pofeng-strike/npc_bloodcurse",
		"perform_busy_u":"yinshi/unarmed/pofeng-strike/rufengsibi",
		"perform_unarmed_attack3":"lama/unarmed/bloodystrike/fofawubian",
   		"set_1":		"marks/hammerwhip",
        ]),
  	([      
		"group":		"fighter_w",
		"npc":                	"wuche-axe",
                "name":			"马休",
                "class":	      	"shaolin",
                "gender":		"男性",
                "skill_type_w":	      	"axe/wuche-axe",
                "skill_type_u":		"yijinjing",
                "skill_type_d":		"puti-steps",
                "d_adjust":		 50,
                "unarmed":		"yijinjing",
                "hammer":		"liuxing-hammer",
                "force":		"xiaochengforce",
                "parry":		"wuche-axe",
                "dodge":		"puti-steps",
                "spear":		"duanhun-spear",
                "staff":		"fumostaff",
		"iron-cloth":		"yijinjing",
		"others1":		"dabei-strike",
		"others2":		"yiyangzhi",
		"others3":		"tenderzhi",
		"perform_weapon_attack":"shaolin/axe/wuche-axe/sanbanfu",
		"perform_weapon_attack2":"shaolin/hammer/liuxing-hammer/fanbei",
		"perform_weapon_attack3":"shaolin/spear/duanhun-spear/suomengchanhun",
		"perform_unarmed_attack":"shaolin/unarmed/yiyangzhi/qiankun",
		"perform_unarmed_attack2":"taoist/unarmed/tenderzhi/qiankun",
		"perform_busy_u":"shaolin/unarmed/dabei-strike/qianshouqianbian",
		"perform_busy_w":"shaolin/staff/fumostaff/hequhecong",
        ]),     
  	([      
		"group":		"fighter_w",
		"npc":                	"yijinjing",
                "name":			"小天意",
                "class":	      	"shaolin",
                "gender":		"男性",
                "skill_type_w":	      	"axe/wuche-axe",
                "skill_type_u":		"yizhichan",
                "skill_type_d":		"puti-steps",
                "d_adjust":		 50,
                "unarmed":		"yizhichan",
                "force":		"xiaochengforce",
                "parry":		"wuche-axe",
                "dodge":		"puti-steps",
                "spear":		"duanhun-spear",
                "staff":		"fumostaff",
		"iron-cloth":		"yijinjing",
		"others1":		"dabei-strike",
		"perform_weapon_attack":"shaolin/axe/wuche-axe/sanbanfu",
		"perform_unarmed_attack":"shaolin/unarmed/yizhichan/nianhua",
		"perform_busy_u":"shaolin/unarmed/dabei-strike/qianshouqianbian",
		"perform_busy_w":"shaolin/staff/fumostaff/hequhecong",
        ]),     
  	([      
		"group":		"fighter_w",
		"npc":                	"jin-gang",
                "name":			"雷芳",
                "class":	      	"lama",
                "gender":		"男性",
                "skill_type_w":	      	"staff/cloudstaff",
                "skill_type_u":		"bloodystrike",
                "skill_type_d":		"puti-steps",
                "d_adjust":		 100,
                "unarmed":		"bloodystrike",
                "force":		"bolomiduo",
                "parry":		"cloudstaff",
                "dodge":		"puti-steps",
                "staff":		"cloudstaff",
		"iron-cloth":		"jin-gang",
		"others1":		"fengyu-piaoxiang",
		"perform_weapon_attack":"lama/staff/cloudstaff/longxianyuye",
		"perform_weapon_attack2":"bat/dodge/fengyu-piaoxiang/zonghengsihai",
		"perform_busy_u":	"lama/unarmed/bloodystrike/fofawubian",
        ]), 
  	([      
		"group":		"magician",
		"npc":                	"kwan-yin-spells",
                "name":			"雨飞",
                "class":	      	"lama",
                "gender":		"女性",
                "skill_type_w":	      	"staff/cloudstaff",
                "skill_type_u":		"bloodystrike",
                "skill_type_d":		"puti-steps",
                "d_adjust":		 50,
                "unarmed":		"bloodystrike",
                "force":		"bolomiduo",
                "parry":		"cloudstaff",
                "dodge":		"puti-steps",
                "staff":		"cloudstaff",
                "iron-cloth":		"jin-gang",
                "spells":		"kwan-yin-spells",
		"perform_weapon_attack":"lama/staff/cloudstaff/longxianyuye",
		"perform_busy_u":	"lama/unarmed/bloodystrike/fofawubian",
        ]),     
  	([      
		"group":		"magician",
		"npc":                	"necromancy",
                "name":			"阿蕊",
                "class":	      	"taoist",
                "gender":		"女性",
                "skill_type_w":	      	"sword/snowshade-sword",
                "skill_type_u":		"tenderzhi",
                "skill_type_d":		"notracesnow",
                "d_adjust":		 100,
                "w_adjust":		 20,
                "unarmed":		"tenderzhi",
                "force":		"gouyee",
                "parry":		"snowshade-sword",
                "dodge":		"notracesnow",
                "sword":		"snowshade-sword",
                "spells":		"necromancy",
                "others1":		"bloodystrike",
		"perform_weapon_attack":"taoist/sword/snowshade-sword/baixueaiai",
		"perform_unarmed_attack":"taoist/unarmed/tenderzhi/qiankun",
        	"perform_unarmed_attack2":"lama/unarmed/bloodystrike/fofawubian",
        	"set_1":		"fy41/taoist_bolt_1",
		"set_2":		"open_sesame/taoist",
        ]), 
  	([      
		"group":		"magician",
		"npc":                	"scratmancy",
                "name":			"飞涛",
                "class":	      	"taoist",
                "gender":		"男性",
                "skill_type_w":	      	"sword/snowshade-sword",
                "skill_type_u":		"tigerstrike",
                "skill_type_d":		"notracesnow",
                "d_adjust":		 100,
                "w_adjust":		 20,
                "unarmed":		"tigerstrike",
                "force":		"gouyee",
                "parry":		"snowshade-sword",
                "dodge":		"notracesnow",
                "sword":		"snowshade-sword",
                "scratching":		"scratmancy",
                "others1":		"bloodystrike",
		"perform_weapon_attack":"taoist/sword/snowshade-sword/baixueaiai",
		"perform_unarmed_attack":"lama/unarmed/bloodystrike/fofawubian", 	
        ]),                                 
  	([      
		"group":		"magician",
		"npc":                	"alchemy",
                "name":			"催命道长",
                "class":	      	"taoist",
                "gender":		"男性",
                "skill_type_w":	      	"sword/snowshade-sword",
                "skill_type_u":		"tigerstrike",
                "skill_type_d":		"notracesnow",
                "d_adjust":		 100,
                "w_adjust":		 20,
                "unarmed":		"tigerstrike",
                "force":		"gouyee",
                "parry":		"snowshade-sword",
                "dodge":		"notracesnow",
                "sword":		"snowshade-sword",
                "magic":		"alchemy",
                "scratching":		"scratmancy",
                "others1":		"bloodystrike",
                "others2":		"alchemy",
		"perform_weapon_attack":"taoist/sword/snowshade-sword/baixueaiai",
		"perform_unarmed_attack":"lama/unarmed/bloodystrike/fofawubian", 	
        ]),  
	([      
		"group":		"fighter_w",
		"npc":                	"healer",
                "name":			"春风",
                "class":	      	"bonze",
                "gender":		"男性",
                "skill_type_w":	      	"staff/cloudstaff",
                "skill_type_u":		"dabei-strike",
                "skill_type_d":		"fengyu-piaoxiang",
                "d_adjust":		100,
                "unarmed":		"dabei-strike",
                "staff":		"cloudstaff",
                "force":		"lotusforce",
                "parry":		"cloudstaff",
                "dodge":		"fengyu-piaoxiang",
		"magic":		"essencemagic",
		"iron-cloth":		"xisui",
		"perform_weapon_attack":"bonze/staff/cloudstaff/npc_mind_sense",
		"perform_unarmed_attack":"bonze/unarmed/dabei-strike/npc_mind_sense",
		"perform_busy_d":	"bat/dodge/fengyu-piaoxiang/zonghengsihai",
		"perform_busy_u":	"bonze/unarmed/dabei-strike/qianshouqianbian",
      ]), 

});


mapping query_npc(string group_name, string npc_name, int special){
	
	int total/*,i*/,x,n,m;
//	string npc;
	
	total=sizeof(npctype);
	n=1;
	m=total;
	
	if (npc_name=="random") {
		if (group_name=="random") x=random(total);
		else while(n) {
			x=random(total);
			if (npctype[x]["group"]==group_name) n=0;
			}
	} else {
		while (m--) {
			if (npctype[m]["npc"]==npc_name) {
				x=m; break;		
			}
		} 
	}	
	return npctype[x];
}



mapping *npclist(){
	return npctype;
}